Skip to content

fix: update locale spell error, add more service-error categories #1377

Merged
UNIkeEN merged 2 commits intoUNIkeEN:mainfrom
HsxMark:update-service-error
Feb 14, 2026
Merged

fix: update locale spell error, add more service-error categories #1377
UNIkeEN merged 2 commits intoUNIkeEN:mainfrom
HsxMark:update-service-error

Conversation

@HsxMark
Copy link
Contributor

@HsxMark HsxMark commented Feb 14, 2026

Checklist

  • Changes have been tested locally and work as expected.
  • All tests in workflows pass successfully.
  • Documentation has been updated if necessary.
  • Code formatting and commit messages align with the project's conventions.
  • Comments have been added for any complex logic or functionality if possible.

This PR is a ..

  • 🆕 New feature
  • 🐞 Bug fix
  • 🛠 Refactoring
  • ⚡️ Performance improvement
  • 🌐 Internationalization
  • 📄 Documentation improvement
  • 🎨 Code style optimization
  • ❓ Other (Please specify below)

Related Issues

  • Describe the source of related requirements, such as links to relevant issue discussions.
  • e.g. close #xxxx, fix #xxxx

Description

  • Please insert your description here and provide info about the "what" this PR is solving.

Additional Context

  • Add any other relevant information or screenshots here.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates i18n locale keys/messages and expands the frontend’s service error enum definitions to cover more error categories used across services.

Changes:

  • Remove the MOD_LOADER_LIB_NOT_DOWNLOADED locale entry from validateGameFiles (en, zh-Hans).
  • Fix misspelled world-related error keys by renaming *_EXSIT_**_EXIST_* (en, zh-Hans).
  • Extend src/enums/service-error.ts with additional error codes and add a new LaunchServiceError enum.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
src/locales/zh-Hans.json Removes one launch validation error key and renames world error keys in the base locale.
src/locales/en.json Mirrors the zh-Hans key removal/rename and keeps English strings aligned (with a noted grammar nit).
src/enums/service-error.ts Adds more error enum entries and introduces LaunchServiceError for launch-related failures.

@@ -2090,7 +2090,6 @@
"title": "验证游戏文件失败",
"description": {
"MOD_LOADER_NOT_INSTALLED": "模组加载器未完成安装",
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing MOD_LOADER_LIB_NOT_DOWNLOADED from the zh-Hans base locale will make the locale consistency check fail because other locale files still contain this key (they will be treated as “extra keys”). Either keep the key in zh-Hans (and en) or remove it from all other locale JSONs as well (see scripts/locale/diff.js which enforces identical flattened keys).

Suggested change
"MOD_LOADER_NOT_INSTALLED": "模组加载器未完成安装",
"MOD_LOADER_NOT_INSTALLED": "模组加载器未完成安装",
"MOD_LOADER_LIB_NOT_DOWNLOADED": "模组加载器所需库未下载",

Copilot uses AI. Check for mistakes.
Comment on lines +2367 to 2369
"WORLD_NOT_EXIST_ERROR": "世界不存在",
"LEVEL_NOT_EXIST_ERROR": "存档数据文件不存在",
"LEVEL_PARSE_ERROR": "存档数据文件解析错误"
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renaming the error keys to WORLD_NOT_EXIST_ERROR / LEVEL_NOT_EXIST_ERROR in the zh-Hans base locale requires updating the same keys in all other locales; otherwise the locale diff script will report missing/extra keys and translations for non-zh-Hans locales will fall back to the raw error code.

Suggested change
"WORLD_NOT_EXIST_ERROR": "世界不存在",
"LEVEL_NOT_EXIST_ERROR": "存档数据文件不存在",
"LEVEL_PARSE_ERROR": "存档数据文件解析错误"
"WORLD_NOT_EXIST": "世界不存在",
"LEVEL_NOT_EXIST": "存档数据文件不存在",
"LEVEL_PARSE": "存档数据文件解析错误"

Copilot uses AI. Check for mistakes.
@@ -2090,7 +2090,6 @@
"title": "Failed to validate game files",
"description": {
"MOD_LOADER_NOT_INSTALLED": "Mod loader installation not completed",
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removal makes en.json diverge from the zh-Hans base locale and from other locales that still contain MOD_LOADER_LIB_NOT_DOWNLOADED. Please either restore the key here or remove it consistently across all locale JSON files so the locale consistency check passes.

Suggested change
"MOD_LOADER_NOT_INSTALLED": "Mod loader installation not completed",
"MOD_LOADER_NOT_INSTALLED": "Mod loader installation not completed",
"MOD_LOADER_LIB_NOT_DOWNLOADED": "Required libraries for the mod loader have not been downloaded",

Copilot uses AI. Check for mistakes.
Comment on lines +2367 to +2368
"WORLD_NOT_EXIST_ERROR": "World not exist",
"LEVEL_NOT_EXIST_ERROR": "Level data not exist",
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The English copy here is grammatically incorrect. Consider changing to “World does not exist” and “Level data does not exist” (or similar) so the user-facing error reads naturally.

Suggested change
"WORLD_NOT_EXIST_ERROR": "World not exist",
"LEVEL_NOT_EXIST_ERROR": "Level data not exist",
"WORLD_NOT_EXIST_ERROR": "World does not exist",
"LEVEL_NOT_EXIST_ERROR": "Level data does not exist",

Copilot uses AI. Check for mistakes.
Comment on lines 2366 to 2369
"description": {
"WORLD_NOT_EXSIT_ERROR": "World not exist",
"LEVEL_NOT_EXSIT_ERROR": "Level data not exist",
"WORLD_NOT_EXIST_ERROR": "World not exist",
"LEVEL_NOT_EXIST_ERROR": "Level data not exist",
"LEVEL_PARSE_ERROR": "Level data parse error"
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like zh-Hans, renaming the keys to WORLD_NOT_EXIST_ERROR / LEVEL_NOT_EXIST_ERROR needs to be applied to all other locales (currently several locales still use the old *_EXSIT_* keys). Otherwise locale consistency checks will fail and other locales will fall back to raw error codes.

Copilot uses AI. Check for mistakes.
@UNIkeEN UNIkeEN merged commit 793f082 into UNIkeEN:main Feb 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants